package com.wish.g3.account.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 企业账户流水明细(企业账户变动历史记录)
 * </p>
 *
 * @author wish
 * @since 2022-11-23
 */
@TableName("tb_cw_balance")
public class CwBalance implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键 自增
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 商户ID
     */
    private Long businessId;

    /**
     * 商户名称
     */
    private String businessName;

    /**
     * 流水操作类型(画面查询显示用),1：收入，2：支出
     */
    private Integer balanceType;

    /**
     * 操作类型,1：充值（企业充值），2：提现（企业提现），3：收款（企业收款计划），4：付款（企付款款计划）
     */
    private Integer operationType;

    /**
     * 操作业务订单ID，业务订单ID（收/付款计划ID，提现的时候，为提现申请单号，充值就是充值单号）
     */
    private Long ywOrderId;

    /**
     * 业务订单号(收付款计划号，提现申请单号，充值单号)
     */
    private String ywOrderNo;

    /**
     * 支付订单ID, 对应的支付订单（t_cw_pay_order）流水ID，无流水的时候无
     */
    private Long payOrderId;

    /**
     * 支付订单号（操作订单号），对应的支付订单（t_cw_pay_order）流水号，无流水的时候无
     */
    private String payOrderNo;

    /**
     * 操作明细（收付款的时候，根据款项来，充值就是充值，提现就是提现）
     */
    private String opItem;

    /**
     * 操作时间
     */
    private LocalDateTime opTime;

    /**
     * 操作金额	,负数时为减
     */
    private BigDecimal amount;

    /**
     * 新的余额
     */
    private BigDecimal balance;

    /**
     * 合同ID，有对应的合同的时候记录
     */
    private Long contractId;

    /**
     * 合同编号
     */
    private String contractNo;

    /**
     * 合同类型, 1：收房合同，2：出房合同
     */
    private Integer contractType;

    /**
     * 状态编码（预留字段，因为来源比较多，状态不固定，暂时不用，直接用状态名称来显示，）
     */
    private Integer statusCode;

    /**
     * 状态（由对应业务处理情况实时更新）
     */
    private String statusName;

    /**
     * 备注
     */
    private String remarks;

    /**
     * 删除标识,0:未删除，1：删除
     */
    private Boolean delFlg;

    /**
     * 创建用户ID
     */
    private Long createUserid;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 更新用户ID
     */
    private Long updateUserid;

    /**
     * 更新时间
     */
    private LocalDateTime updateTime;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    public Long getBusinessId() {
        return businessId;
    }

    public void setBusinessId(Long businessId) {
        this.businessId = businessId;
    }
    public String getBusinessName() {
        return businessName;
    }

    public void setBusinessName(String businessName) {
        this.businessName = businessName;
    }
    public Integer getBalanceType() {
        return balanceType;
    }

    public void setBalanceType(Integer balanceType) {
        this.balanceType = balanceType;
    }
    public Integer getOperationType() {
        return operationType;
    }

    public void setOperationType(Integer operationType) {
        this.operationType = operationType;
    }
    public Long getYwOrderId() {
        return ywOrderId;
    }

    public void setYwOrderId(Long ywOrderId) {
        this.ywOrderId = ywOrderId;
    }
    public String getYwOrderNo() {
        return ywOrderNo;
    }

    public void setYwOrderNo(String ywOrderNo) {
        this.ywOrderNo = ywOrderNo;
    }
    public Long getPayOrderId() {
        return payOrderId;
    }

    public void setPayOrderId(Long payOrderId) {
        this.payOrderId = payOrderId;
    }
    public String getPayOrderNo() {
        return payOrderNo;
    }

    public void setPayOrderNo(String payOrderNo) {
        this.payOrderNo = payOrderNo;
    }
    public String getOpItem() {
        return opItem;
    }

    public void setOpItem(String opItem) {
        this.opItem = opItem;
    }
    public LocalDateTime getOpTime() {
        return opTime;
    }

    public void setOpTime(LocalDateTime opTime) {
        this.opTime = opTime;
    }
    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }
    public BigDecimal getBalance() {
        return balance;
    }

    public void setBalance(BigDecimal balance) {
        this.balance = balance;
    }
    public Long getContractId() {
        return contractId;
    }

    public void setContractId(Long contractId) {
        this.contractId = contractId;
    }
    public String getContractNo() {
        return contractNo;
    }

    public void setContractNo(String contractNo) {
        this.contractNo = contractNo;
    }
    public Integer getContractType() {
        return contractType;
    }

    public void setContractType(Integer contractType) {
        this.contractType = contractType;
    }
    public Integer getStatusCode() {
        return statusCode;
    }

    public void setStatusCode(Integer statusCode) {
        this.statusCode = statusCode;
    }
    public String getStatusName() {
        return statusName;
    }

    public void setStatusName(String statusName) {
        this.statusName = statusName;
    }
    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }
    public Boolean getDelFlg() {
        return delFlg;
    }

    public void setDelFlg(Boolean delFlg) {
        this.delFlg = delFlg;
    }
    public Long getCreateUserid() {
        return createUserid;
    }

    public void setCreateUserid(Long createUserid) {
        this.createUserid = createUserid;
    }
    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }
    public Long getUpdateUserid() {
        return updateUserid;
    }

    public void setUpdateUserid(Long updateUserid) {
        this.updateUserid = updateUserid;
    }
    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return "TbCwBalance{" +
            "id=" + id +
            ", businessId=" + businessId +
            ", businessName=" + businessName +
            ", balanceType=" + balanceType +
            ", operationType=" + operationType +
            ", ywOrderId=" + ywOrderId +
            ", ywOrderNo=" + ywOrderNo +
            ", payOrderId=" + payOrderId +
            ", payOrderNo=" + payOrderNo +
            ", opItem=" + opItem +
            ", opTime=" + opTime +
            ", amount=" + amount +
            ", balance=" + balance +
            ", contractId=" + contractId +
            ", contractNo=" + contractNo +
            ", contractType=" + contractType +
            ", statusCode=" + statusCode +
            ", statusName=" + statusName +
            ", remarks=" + remarks +
            ", delFlg=" + delFlg +
            ", createUserid=" + createUserid +
            ", createTime=" + createTime +
            ", updateUserid=" + updateUserid +
            ", updateTime=" + updateTime +
        "}";
    }
}
